﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessLibrary.DAL;

namespace BusinessLibrary.BLL
{
   public class Niveau
    {
        # region var
        public int Id { get; set; }
        public string Nom { get; set; }
      
        //public Niveau niveau { get; set; }

  

        #endregion
        #region methodes
        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static Niveau GetNiveauById(int id)
        {
            return sqlNiveau.GetNiveauById(id);
        }


        public static int deleteNiveau(int id)
        {
            return sqlNiveau.deletNiveau(id);
        }


        public static int SaveNiveau(Niveau n)
        {
            int nbRow;
            if ((nbRow = sqlNiveau.updateNiveau(n)) > 0)
                return nbRow;
            else
                return sqlNiveau.insertNiveau(n);
        }


        public static List<Niveau> GetListeListeNiveau()
        {
            return sqlNiveau.SelectListeNiveau();
        }
    }
        #endregion
}
